<?php

/*
	- We had to write our queries and our security (mysql_real_escape_string()) by ourselves.
	- Also, we had to keep track of identifiers of the inserted fields by ourselves.
 	- We had to rewrite every function name (and probably also functionality) when switching database vendor.
 	- Not really OO friendly, heh?
*/

mysql_connect('localhost', 'user', 'password');
mysql_select_db('test');

//simple example
mysql_query('INSERT INTO greetings (content) 
	VALUES ("' . mysql_real_escape_string($_POST['greeting']) . '")');

//comments example
mysql_query('INSERT INTO users (username) 
	VALUES ("' . mysql_real_escape_string($_POST['username']) . '")');
mysql_query('INSERT INTO comments (user_id, content) 
	VALUES (' . mysql_insert_id() . ',"' . mysql_real_escape_string($_POST['content']) . '")');